﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using VideoClub.UI.Actores;
using VideoClub.UI.Reportes;
using VideoClub.UI.Socios;

namespace VideoClub.UI.Principal
{
    public partial class frmPrincipal : Form
    {
        public frmPrincipal()
        {
            InitializeComponent();
        }

        private Boolean banderaConsultaActores = false;

        private void actoresToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if(banderaConsultaActores != true)
            {
                var frm = new FrmActores();
                frm.Show();
                frm.FormClosed += new FormClosedEventHandler(frmConsultaActor_FormClosed);
                banderaConsultaActores   = true;
            }
            
        }

        private void frmConsultaActor_FormClosed(object sender, FormClosedEventArgs e)
        {
            banderaConsultaActores = false;
        }

        private void nuevoClienteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frm = new FrmConsultarSocio();
            frm.Show();
        }

        private void reportesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frm = new FrmReportePrincipal();
            frm.Show();
        }

        private void sociosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmPrimerReporte frmp = new FrmPrimerReporte();
            frmp.Show();
        }

        private void peliculasToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            FrmSegundoReporte frmp = new FrmSegundoReporte();
            frmp.Show();
        }
    }
}
